<?php 
/*include  "./../protected.php"; /*Valida el inico de sesion*/
error_reporting(0);
?>
<!DOCTYPE html>
<head>
<link href="ceGrid.css" rel="stylesheet" type="text/css">
<link href="main.css" rel="stylesheet" type="text/css">
<meta charset="UTF-8">
</head>


<button class ="btn" id= "atras" type="button" onclick="javascript: location.href='../../menu.php'">Regresar</button>


<body>
<div id="content">
<?php

/*
$host = "74.220.207.160";
$usuario = "repuest3_genesys";
$clave = "1q2w3e4r5t6y";*/

$host = "localhost";
$usuario ="cemede";
$clave = "cemede";

require '../tool/ceSQL.php';
require '../tool/ceGrid.php';

$dbase = new ceMySQLAdap($host,$usuario, $clave,"dbproin");

$dg = new ceDataGrid($dbase); 

$dg->setQuery("sc01IDAC,sc01NOAC,sc01AP01AC,sc01AP02AC,sc01DEAC,sc05NOAR","vw_listadoacademicos");

$dg->allowFilters();

$dg->showCreateButton("href='mt01.php'", ceDataGrid::TYPE_ONCLICK, 'Agregar');
$dg->setResultsPerPage(10);

$dg->setColumnHeader('sc01IDAC', 'CODIGO');
$dg->setColumnHeader('sc01NOAC', 'NOMBRE Academico');
$dg->setColumnHeader('sc01AP01AC', 'Apellido 1');
$dg->setColumnHeader('sc01AP02AC', 'Apellido 2');
$dg->setColumnHeader('sc01DEAC', 'Descripcion');
$dg->setColumnHeader('sc05NOAR', 'Nombre Area');

$dg->addStandardControl(ceDataGrid::STDCTRL_EDIT, "href='mt02.php?id=%sc01IDAC%'");
$dg->addStandardControl(ceDataGrid::STDCTRL_DELETE, "href='delete.php?id=%sc01IDAC%'");

$dg->showReset("Refrescar");
$dg->printTable();
?>
</div>
</body>
</html>